﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using BilbilDAL;
using Common;
using Modles.DTO;

namespace BilbilBLL
{
    public class VideoHistoryServer
    {
        /// <summary>
        /// 获取今天观看过的视频记录
        /// </summary>
        /// <param name="UserInfoId"></param>
        /// <returns></returns>
        public ResponseTool GetVideoHistoryToday(int UserInfoId)
        {
            if (UserInfoId == 0)
            {
                ResponseTool.Fail("用户信息id不能为空");
            }
            return ResponseTool.Succeed(new VideoHistoryDAL().GetVideoHistoryToday(UserInfoId));
        }
        /// <summary>
        /// 获取昨天观看过的视频记录
        /// </summary>
        /// <param name="UserInfoId"></param>
        /// <returns></returns>
        public ResponseTool GetVideoHistoryYesterday(int UserInfoId)
        {
            if (UserInfoId == 0)
            {
                ResponseTool.Fail("用户信息id不能为空");
            }
            return ResponseTool.Succeed(new VideoHistoryDAL().GetVideoHistoryYesterday(UserInfoId));
        }
        /// <summary>
        /// 获取更久之前的视频记录
        /// </summary>
        /// <param name="UserInfoId"></param>
        /// <returns></returns>
        public ResponseTool GetVideoHistoryALongTimeAgo(int UserInfoId)
        {
            if (UserInfoId == 0)
            {
                ResponseTool.Fail("用户信息id不能为空");
            }
            return ResponseTool.Succeed(new VideoHistoryDAL().GetVideoHistoryALongTimeAgo(UserInfoId));
        }
    }
}
